package demo1103.demo03;

import java.util.function.Supplier;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/3 14:43
 */
public class TestSupplier {
    public static void main(String[] args) {
        Supplier<String> s1 = ()->{
            return "获得结果";
        };
        result(s1);
    }
    public static void result(Supplier<String> supplier){
        String s = supplier.get();
        System.out.println(s);
    }
}
